package cn.czk.demo.controller;


import dev.langchain4j.model.chat.ChatLanguageModel;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping
@RestController
public class OpenAIController {

    @Resource
    private ChatLanguageModel chatLanguageModel;


    @GetMapping("/openai/hello")
    public String hello(){
        return chatLanguageModel.generate("你会中文吗？");
    }



}
